package com.ruge._01_annotationandconfiguration._01_获取自定义属性的值;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@PropertySource("classpath:ruge.properties")
public class _01_Value注解获取配置文件的自定义属性 {
    @Value("${ruge.name}")
    private String author;

    @RequestMapping("/value")
    public String index() {
        return author;
    }
}
